package edu.kjxy.demo0408;

public class PersonDemo02 {

	public static void main(String[] args) {
		System.out.println("几个人:" + Person.count);
		Car car = new Car("鄂888888", "保时捷", 219000);
		
		Person p1 = new Person("44553434353", "唐三藏", "2002-02-02", "男", car);
		p1.eat("苹果");
		p1.travel("三峡大坝");
		
		System.out.println("几个人:" + Person.count);
		
		Person p2 = new Person("44554445353", "王二麻子", "2002-04-04", "男");
		p2.travel("冰河公园");
		
		Car car2 = new Car("鄂999999", "老头乐", 20000);
		p2.car = car2;
		p2.travel("洛基山");
		System.out.println("几个人:" + Person.count);
		
		Person p3 = new Person("44554445353", "王二麻子", "2002-04-04", "男");
		System.out.println("几个人:" + Person.count);
	}
}
